<link rel="stylesheet" href="css/contractLibrary/contractLibraryList.css">
<!--最大父级 合同库-->
<div class="contractLibraryList  wt-scroll" ng-click="contractLi.hintContent=''" >
  <div id="contractLibrary_box">
    <div class="conList_nav_search ">
      <span>
        <input type="text" placeholder="请输入模板名称进行搜索" ng-keyup="($event.which === 13)?'':getFindTemplateList()" ng-enter="contractAffirmClassify()" ng-model="contractLi.keyword">
        <span class="conList_nav_icon" ng-class={conList_nav_icon2:conListClassifyToggle} ng-click="conListClassToggle()"><i class="iconfont">&#xe6aa;</i></span>
        <ul class="conList_nav_hint wt-scroll" ng-show="contractLi.hintContent" ng-click="$event.stopPropagation()">
          <li ng-repeat="text in contractLi.hintContent track by $index" ng-click="contractAffirmClassify(text)">{{text.contractName}}</li>
          <li ng-show='!contractLi.hintContent.length' style="color:#A6A6A6;background:#fff; height:60px;line-height: 60px;text-align: center;font-size: 16px;">没有找到您搜索的关键字</li>
        </ul>
      </span>
      <div class="conList_classify_selected clearfix" ng-hide="contractLi.parentId==''">
        <span >已选类型：</span>
        <span class="classify_selected classify_selected2" >{{contractLi.parentName}} <i class="iconfont" style="cursor:pointer;" ng-click="queryDictTreeData('')">&#xe683;</i></span>
        <span class="classify_selected classify_selected2" style="margin-left:10px;" ng-show="contractLi.classifyChildren">{{contractLi.classifyChildren}} <i class="iconfont" style="cursor:pointer;" ng-click="contractAffirmClassifyC()">&#xe683;</i></span>
      </div>
    </div>
    <div class="conList_classify" ng-show="conListClassifyToggle">
      <div class="conList_classify_item clearfix" >
        <span >模版类型</span>
        <span class="classify_item" ng-class={classify_selected2:contractLi.parentId==''} ng-click="queryDictTreeData('','')">全部</span>
        <span class="classify_item" ng-class={classify_selected2:contractLi.parentId==fat.id} ng-repeat="fat in contractLi.fatSevreClassify track by $index" ng-click="queryDictTreeData(fat.id,fat.name)">{{fat.name}}</span>
      </div>
      <div class="conList_classify_item clearfix" ng-show="contractLi.sevreClassify.length">
       <table>
         <tr>
           <td class="clearfix"><span >服务类型</span></td>
           <td class="clearfix">
             <span class="classify_item" ng-class={classify_selected2:contractLi.classifyChildren==''} ng-click="contractAffirmClassifyC()">全部</span>
             <span class="classify_item" ng-class={classify_selected2:contractLi.classifyChildren==classify.name} ng-repeat="classify in contractLi.sevreClassify track by $index" ng-click="contractAffirmClassifyC(classify)">{{classify.name}}</span>
           </td>
         </tr>
       </table>
      </div>
      <div class="conList_classify_close" ng-click="conListClassToggle()">
        <img src="img/d_arrow_close.svg" alt="">收起
      </div>
    </div>
  </div>

  <div class="conList_item wt-scroll" >
    <div class="conList_item_con clearfix" ng-repeat="list in contractLi.contractList track by $index">
      <div class="conList_item_left fl"></div>
      <div class="conList_item_center fl">
        <h6>{{list.contractName}} <span>{{list.parentName}}</span></h6>
        <p>{{list.description}}</p>
        <ul>
          <li>浏览量: <span>{{list.readCount}}</span></li>
          <li>下载量: <span>{{list.downloadCount}}</span></li>
          <li>{{list.parentName=='非诉'?'服务类型: ':'案件类型: '}}<span>{{list.typeName}}</span></li>
        </ul>
      </div>
      <ul class="conList_item_right">
        <li ng-if="list.isCollection == '1'" ng-click="delCollect(list, $index)"><img ng-src="img/d_star_selected.svg" alt=""></li>
        <li ng-if="list.isCollection == '0'" ng-click="addCollect(list, $index)"><img ng-src="img/d_star_up.svg" alt=""></li>
        <li ng-click="downloadFileProgress(list, $index)"><img src="img/d_download_up.svg" alt=""></li>
        <li ui-sref="contractLibraryView({id:list.id})"><img src="img/d_preview_up.svg" alt=""></li>
      </ul>
    </div>
   <div style="height:60px;line-height: 60px;color:#A6A6A6;text-align: center;font-size: 18px;letter-spacing: 1" ng-show="!contractLi.contractList.length">
     无搜索结果
   </div>
    <div class="pagingBox" ng-show="contractLi.total > 10" scroll-top="fh">
      <div class="ssqPagingSimple">
        <ul uib-pagination total-items="contractLi.total" ng-model="contractLi.beginNum" items-per-page="contractLi.pageSize" class="pagination-sm" boundary-link-numbers="true" ng-change="getContractLibrary()" max-size="10" previous-text="上一页" next-text="下一页" ></ul>
      </div>
    </div>
  </div>
</div>



<script>
  $(window).ready(function () {

    /*设置屏幕高度*/
    setHeight();
    function setHeight() {
      var maxHeight = $(window).height()-129 + 'px';
//      var maxCHeight = $(window).height()-129-$('#contractLibrary_box').height()+ 'px';
      $(".contractLibraryList").css("height",maxHeight);
//      $('.conList_item').css('max-height',maxCHeight)
    };
    $(window).resize(function() {
      setHeight();
    });

  })
</script>
